using System;
using System.Collections.Generic;
using System.Text;
using OgilvyOne.SqlServerDAL;
using OgilvyOne.IDAL;
using System.Configuration;
using System.Reflection;

namespace OgilvyOne.DALFactory
{
    public class CreateInstance
    {
        private static readonly string path = ConfigurationManager.AppSettings["WebDAL"];

        public static IColumnInfo CreateColumnInfo()
        {
            string className = path + ".SColumnInfo";
            return (IColumnInfo)Assembly.Load(path).CreateInstance(className);
        }

        public static ISYS_MENU CreateSYS_MENU()
        {
            string className = path + ".SSYS_MENU";
            return (ISYS_MENU)Assembly.Load(path).CreateInstance(className);
        }

        public static IMenu_Info CreateMenu_Info()
        {
            string className = path + ".SMenu_Info";
            return (IMenu_Info)Assembly.Load(path).CreateInstance(className);
        }

        public static IECard CreateECard()
        {
            string typeName = path + ".SECard";
            return (IECard)Assembly.Load(path).CreateInstance(typeName);
        }

        public static IMeCard CreateMeCard()
        {
            string typeName = path + ".SMeCard";
            return (IMeCard)Assembly.Load(path).CreateInstance(typeName);
        }

        public static IOgilvyeCard CreateOgilvyeCard()
        {
            string typeName = path + ".SOgilvyeCard";
            return (IOgilvyeCard)Assembly.Load(path).CreateInstance(typeName);
        }

        public static IPictureList CreatePictureList()
        {
            string typeName = path + ".SPictureList";
            return (IPictureList)Assembly.Load(path).CreateInstance(typeName);
        }

        public static ISiteForward CreateSiteForward()
        {
            string typeName = path + ".SSiteForward";
            return (ISiteForward)Assembly.Load(path).CreateInstance(typeName);
        }

        public static ISiteRegister CreateSiteRegister()
        {
            string typeName = path + ".SSiteRegister";
            return (ISiteRegister)Assembly.Load(path).CreateInstance(typeName);
        }

        public static IVWTracking CreateVWTracking()
        {
            string typeName = path + ".SVWTracking";
            return (IVWTracking)Assembly.Load(path).CreateInstance(typeName);
        }

        public static IXjpeCard CreateXjpeCard()
        {
            string typeName = path + ".SXjpeCard";
            return (IXjpeCard)Assembly.Load(path).CreateInstance(typeName);
        }

        public static ICON_INFO CreateCON_INFO()
        {
            string className = path + ".SCON_INFO";
            return (ICON_INFO)Assembly.Load(path).CreateInstance(className);
        }
        public static IDAL.IDALUserInfo CreateDALUserInfo()
        {
            string className = path + ".DALUserInfo";
            return (IDALUserInfo)Assembly.Load(path).CreateInstance(className);
        }
    }

    public class Address
    {
        // Methods
        public static IAddress Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Address";
            return (IAddress)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class Asset
    {
        // Methods
        public static IAsset Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Asset";
            return (IAsset)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class Buy
    {
        // Methods
        public static IDALBuy Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".DALBuy";
            return (IDALBuy)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class conContent
    {
        // Methods
        public static IconContent Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Asset";
            return (IconContent)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class condownload
    {
        // Methods
        public static Icondownload Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Asset";
            return (Icondownload)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class Content
    {
        // Methods
        public static IContent Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Content";
            Content content = new Content();
            return (IContent)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class ContentClass
    {
        // Methods
        public static IContent Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".ContentClass";
            return (IContent)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class ContentTable
    {
        // Methods
        public static IContentTable Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".ContentTable";
            return (IContentTable)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class contenttag
    {
        // Methods
        public static Icontenttag Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".ContentTagClass";
            return (Icontenttag)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class CSListDAL
    {
        // Methods
        public static ICSList Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".CSList";
            return (ICSList)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class CSViewDAL
    {
        // Methods
        public static ICSView Create()
        {
            return new CSView();
        }
    }

    public class DownLoad
    {
        // Methods
        public static IDownLoad Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Asset";
            return (IDownLoad)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class Func
    {
        // Methods
        public static IFunc Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Func";
            return (IFunc)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class FuncRole
    {
        // Methods
        public static IFuncRole Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".FuncRole";
            return (IFuncRole)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class HotDownload
    {
        // Methods
        public static Ihotdown Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Hotspot";
            HotDown down = new HotDown();
            return (Ihotdown)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class Hotspot
    {
        // Methods
        public static IHotspot Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Hotspot";
            return (IHotspot)Assembly.Load(str).CreateInstance(str2);
        }
    }


    public class Item
    {
        // Methods
        public static IItem Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Item";
            return (IItem)Assembly.Load(str).CreateInstance(str2);
        }
    }


    public class Label
    {
        // Methods
        public static ILabel Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Label";
            return (ILabel)Assembly.Load(str).CreateInstance(str2);
        }
    }


    public class LabelConfig
    {
        // Methods
        public static ILabelConfig Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".LabelConfig";
            return (ILabelConfig)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class Link
    {
        // Methods
        public static ILink Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"].ToString();
            string str2 = str + ".Link";
            return (ILink)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class Member
    {
        // Methods
        public static IMember Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Member";
            return (IMember)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class MenuDesc
    {
        // Methods
        public static IMenuDesc Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".MenuDesc";
            return (IMenuDesc)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class MenuFunc
    {
        // Methods
        public static IMenuFunc Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".MenuFunc";
            return (IMenuFunc)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class Message
    {
        // Methods
        public static IMessage Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Message";
            return (IMessage)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class Product
    {
        // Methods
        public static IProduct Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"].ToString();
            string str2 = str + ".Product";
            return (IProduct)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class ResumeDAL
    {
        // Methods
        public static IResume Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Resume";
            return (IResume)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class Role
    {
        // Methods
        public static IRole Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Role";
            return (IRole)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class RoleUser
    {
        // Methods
        public static IRoleUser Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".RoleUser";
            return (IRoleUser)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class ScoreRule
    {
        // Methods
        public static IScoreRule Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"].ToString();
            string str2 = str + ".ScoreRule";
            return (IScoreRule)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class StaffFavorite
    {
        // Methods
        public static IStaffFavorite Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"].ToString();
            string str2 = str + ".StaffFavorite";
            return (IStaffFavorite)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class StaffInfo
    {
        // Methods
        public static IStaffInfo Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".StaffInfo";
            return (IStaffInfo)Assembly.Load(str).CreateInstance(str2);
        }
    }


    public class stat
    {
        // Methods
        public static IStat Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"].ToString();
            string str2 = str + ".Stat";
            return (IStat)Assembly.Load(str).CreateInstance(str2);
        }
    }


    public static class SysMenu
    {
        // Methods
        public static ISysMenu Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".SysMenu";
            return (ISysMenu)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class TemplateClass
    {
        // Methods
        public static ITemplate Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Template";
            return (ITemplate)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class Tree
    {
        // Methods
        public static ITree ItemCreate()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".Item";
            return (ITree)Assembly.Load(str).CreateInstance(str2);
        }

        public static ITree MenuCreate()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".SysMenu";
            return (ITree)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class User
    {
        // Methods
        public static IUser Create()
        {
            string str = ConfigurationSettings.AppSettings["WebDAL"];
            string str2 = str + ".User";
            return (IUser)Assembly.Load(str).CreateInstance(str2);
        }
    }

    public class Privilege
    {
        // Methods
        public static IPrivilege Create()
        {
            string assemblyString = ConfigurationSettings.AppSettings["WebDAL"];
            string typeName = assemblyString + ".SysManage.Privilege";
            return (IPrivilege)Assembly.Load(assemblyString).CreateInstance(typeName);
        }
    }

    public class PrivilegeKey
    {
        // Methods
        public static IPrivilegeKey Create()
        {
            string assemblyString = ConfigurationSettings.AppSettings["WebDAL"];
            string typeName = assemblyString + ".SysManage.PrivilegeKey";
            return (IPrivilegeKey)Assembly.Load(assemblyString).CreateInstance(typeName);
        }
    }
}
